<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CTimer类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="#friends">友元</a> &#124;
<a href="class_c_timer-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CTimer类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>定时器  
 <a href="class_c_timer.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_timer_8h_source.html">Timer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ad2195dc4c11ce1f98014a22a2314ec5a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#ad2195dc4c11ce1f98014a22a2314ec5a">CTimer</a> (<a class="el" href="class_c_basic_service.html">CBasicService</a> *service)</td></tr>
<tr class="memdesc:ad2195dc4c11ce1f98014a22a2314ec5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化定时器类，并与tcp服务类进行绑定  <a href="class_c_timer.html#ad2195dc4c11ce1f98014a22a2314ec5a">更多...</a><br /></td></tr>
<tr class="separator:ad2195dc4c11ce1f98014a22a2314ec5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd3f6595928cd20f7faaece75f017733"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#afd3f6595928cd20f7faaece75f017733">~CTimer</a> ()</td></tr>
<tr class="memdesc:afd3f6595928cd20f7faaece75f017733"><td class="mdescLeft">&#160;</td><td class="mdescRight">析构函数  <a href="class_c_timer.html#afd3f6595928cd20f7faaece75f017733">更多...</a><br /></td></tr>
<tr class="separator:afd3f6595928cd20f7faaece75f017733"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a744d36ea8c827184cf2cc8634b924574"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a744d36ea8c827184cf2cc8634b924574">Reset</a> ()</td></tr>
<tr class="memdesc:a744d36ea8c827184cf2cc8634b924574"><td class="mdescLeft">&#160;</td><td class="mdescRight">重置定时器  <a href="class_c_timer.html#a744d36ea8c827184cf2cc8634b924574">更多...</a><br /></td></tr>
<tr class="separator:a744d36ea8c827184cf2cc8634b924574"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a745607665b797d5d68e90d32f221304b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a745607665b797d5d68e90d32f221304b">Cancel</a> ()</td></tr>
<tr class="memdesc:a745607665b797d5d68e90d32f221304b"><td class="mdescLeft">&#160;</td><td class="mdescRight">取消定时器  <a href="class_c_timer.html#a745607665b797d5d68e90d32f221304b">更多...</a><br /></td></tr>
<tr class="separator:a745607665b797d5d68e90d32f221304b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4963ccc407406050df39d7b7e9346625"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_machine_time.html">CMachineTime</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a4963ccc407406050df39d7b7e9346625">StartTime</a> (<a class="el" href="class_c_machine_time.html">CMachineTime</a> &amp;t)</td></tr>
<tr class="memdesc:a4963ccc407406050df39d7b7e9346625"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取定时器被设置的时间  <a href="class_c_timer.html#a4963ccc407406050df39d7b7e9346625">更多...</a><br /></td></tr>
<tr class="separator:a4963ccc407406050df39d7b7e9346625"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23172457eece0f1cac40500075a82844"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_timer_base.html">CTimerBase</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a23172457eece0f1cac40500075a82844">GetTimerBase</a> ()</td></tr>
<tr class="separator:a23172457eece0f1cac40500075a82844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dfff99dc253d6d56d3111c2bcf40ea9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a8dfff99dc253d6d56d3111c2bcf40ea9">CTimer</a> (CBasicServiceBase *service)</td></tr>
<tr class="memdesc:a8dfff99dc253d6d56d3111c2bcf40ea9"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化定时器类，并与tcp服务类进行绑定  <a href="class_c_timer.html#a8dfff99dc253d6d56d3111c2bcf40ea9">更多...</a><br /></td></tr>
<tr class="separator:a8dfff99dc253d6d56d3111c2bcf40ea9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd3f6595928cd20f7faaece75f017733"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#afd3f6595928cd20f7faaece75f017733">~CTimer</a> ()</td></tr>
<tr class="memdesc:afd3f6595928cd20f7faaece75f017733"><td class="mdescLeft">&#160;</td><td class="mdescRight">析构函数  <a href="class_c_timer.html#afd3f6595928cd20f7faaece75f017733">更多...</a><br /></td></tr>
<tr class="separator:afd3f6595928cd20f7faaece75f017733"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a744d36ea8c827184cf2cc8634b924574"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a744d36ea8c827184cf2cc8634b924574">Reset</a> ()</td></tr>
<tr class="memdesc:a744d36ea8c827184cf2cc8634b924574"><td class="mdescLeft">&#160;</td><td class="mdescRight">重置定时器  <a href="class_c_timer.html#a744d36ea8c827184cf2cc8634b924574">更多...</a><br /></td></tr>
<tr class="separator:a744d36ea8c827184cf2cc8634b924574"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a745607665b797d5d68e90d32f221304b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a745607665b797d5d68e90d32f221304b">Cancel</a> ()</td></tr>
<tr class="memdesc:a745607665b797d5d68e90d32f221304b"><td class="mdescLeft">&#160;</td><td class="mdescRight">取消定时器  <a href="class_c_timer.html#a745607665b797d5d68e90d32f221304b">更多...</a><br /></td></tr>
<tr class="separator:a745607665b797d5d68e90d32f221304b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5d4796e0e4a17289fa716210ccb97d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#ad5d4796e0e4a17289fa716210ccb97d6">SetTimer</a> (const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;t, <a class="el" href="_sock_tools_8h.html#a65db86524d66ff5c871579e2dacf12ca">lpTimeoutCompleteFunc</a> func, void *invoker=<a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>)</td></tr>
<tr class="memdesc:ad5d4796e0e4a17289fa716210ccb97d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置定时器  <a href="class_c_timer.html#ad5d4796e0e4a17289fa716210ccb97d6">更多...</a><br /></td></tr>
<tr class="separator:ad5d4796e0e4a17289fa716210ccb97d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4963ccc407406050df39d7b7e9346625"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_machine_time.html">CMachineTime</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a4963ccc407406050df39d7b7e9346625">StartTime</a> (<a class="el" href="class_c_machine_time.html">CMachineTime</a> &amp;t)</td></tr>
<tr class="memdesc:a4963ccc407406050df39d7b7e9346625"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取定时器被设置的时间  <a href="class_c_timer.html#a4963ccc407406050df39d7b7e9346625">更多...</a><br /></td></tr>
<tr class="separator:a4963ccc407406050df39d7b7e9346625"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">设置定时器</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>超时时间 </td></tr>
    <tr><td class="paramname">func</td><td>定时器超时时的回调处理函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:afadf9bf2c7fe7f1a6d7c34cbf90f979e"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:afadf9bf2c7fe7f1a6d7c34cbf90f979e"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_timer.html#afadf9bf2c7fe7f1a6d7c34cbf90f979e">SetTimer</a> (const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;t, Func func)</td></tr>
<tr class="separator:afadf9bf2c7fe7f1a6d7c34cbf90f979e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d00239bd70be71654c2c3a7569cadbf"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a0d00239bd70be71654c2c3a7569cadbf"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a0d00239bd70be71654c2c3a7569cadbf">SetTimer</a> (const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;t, Func func, void *invoker)</td></tr>
<tr class="separator:a0d00239bd70be71654c2c3a7569cadbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a62a4a14066f74861211259e2700d69bf"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a62a4a14066f74861211259e2700d69bf">TimerComplete</a> (<a class="el" href="class_c_sock_error.html">CSockError</a> ec, void *invoker)</td></tr>
<tr class="separator:a62a4a14066f74861211259e2700d69bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ae2708cea97ddec84d6b7ede3c2e6d2d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_c_timer_base.html">CTimerBase</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#ae2708cea97ddec84d6b7ede3c2e6d2d9">_timer</a></td></tr>
<tr class="separator:ae2708cea97ddec84d6b7ede3c2e6d2d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a017d22b5d1453069a8da277c69e95770"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a017d22b5d1453069a8da277c69e95770">SetTimer</a> (const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;t, const <a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_handle_base.html">HandleBase</a> &gt; &amp;func, void *invoker=<a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>)</td></tr>
<tr class="separator:a017d22b5d1453069a8da277c69e95770"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:ac014a6dda1a216df1c46156da7c8f69d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#ac014a6dda1a216df1c46156da7c8f69d">delete_class_copy_operator</a> (<a class="el" href="class_c_timer.html">CTimer</a>)</td></tr>
<tr class="separator:ac014a6dda1a216df1c46156da7c8f69d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac014a6dda1a216df1c46156da7c8f69d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#ac014a6dda1a216df1c46156da7c8f69d">delete_class_copy_operator</a> (<a class="el" href="class_c_timer.html">CTimer</a>)</td></tr>
<tr class="separator:ac014a6dda1a216df1c46156da7c8f69d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a71520e0e68129f9759a00383b34c8983"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="_timer_info_8h.html#ad138624af884b17f15fe7c857f59a5c3">TimeoutInfo</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a71520e0e68129f9759a00383b34c8983">_tinfo</a></td></tr>
<tr class="separator:a71520e0e68129f9759a00383b34c8983"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0131fa4a5035636cf6603900d25be408"><td class="memItemLeft" align="right" valign="top">CBasicServiceBase *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a0131fa4a5035636cf6603900d25be408">_tcpService</a></td></tr>
<tr class="separator:a0131fa4a5035636cf6603900d25be408"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
友元</h2></td></tr>
<tr class="memitem:a13347fcbf490b91017644fc3f43692f0"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a13347fcbf490b91017644fc3f43692f0">CTcpServer</a></td></tr>
<tr class="separator:a13347fcbf490b91017644fc3f43692f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22a409cb83120f40cf2419f694137178"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a22a409cb83120f40cf2419f694137178">CTcpClient</a></td></tr>
<tr class="separator:a22a409cb83120f40cf2419f694137178"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98d68824d5c09faeafd9eac9a8bc6f11"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_timer.html#a98d68824d5c09faeafd9eac9a8bc6f11">CTcpTimer</a></td></tr>
<tr class="separator:a98d68824d5c09faeafd9eac9a8bc6f11"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>定时器 </p>

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00069">69</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ad2195dc4c11ce1f98014a22a2314ec5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2195dc4c11ce1f98014a22a2314ec5a">&#9670;&nbsp;</a></span>CTimer() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::CTimer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_basic_service.html">CBasicService</a> *&#160;</td>
          <td class="paramname"><em>service</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化定时器类，并与tcp服务类进行绑定 </p>

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00076">76</a> 行定义.</p>

</div>
</div>
<a id="afd3f6595928cd20f7faaece75f017733"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd3f6595928cd20f7faaece75f017733">&#9670;&nbsp;</a></span>~CTimer() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::~CTimer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>析构函数 </p>

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00081">81</a> 行定义.</p>

</div>
</div>
<a id="a8dfff99dc253d6d56d3111c2bcf40ea9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dfff99dc253d6d56d3111c2bcf40ea9">&#9670;&nbsp;</a></span>CTimer() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::CTimer </td>
          <td>(</td>
          <td class="paramtype">CBasicServiceBase *&#160;</td>
          <td class="paramname"><em>service</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化定时器类，并与tcp服务类进行绑定 </p>

</div>
</div>
<a id="afd3f6595928cd20f7faaece75f017733"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd3f6595928cd20f7faaece75f017733">&#9670;&nbsp;</a></span>~CTimer() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::~CTimer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>析构函数 </p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a745607665b797d5d68e90d32f221304b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a745607665b797d5d68e90d32f221304b">&#9670;&nbsp;</a></span>Cancel() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool CTimer::Cancel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>取消定时器 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>若定时返回失败，则可能已经超时或未设置定时器 </dd></dl>

</div>
</div>
<a id="a745607665b797d5d68e90d32f221304b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a745607665b797d5d68e90d32f221304b">&#9670;&nbsp;</a></span>Cancel() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTimer::Cancel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>取消定时器 </p>
<dl class="section return"><dt>返回</dt><dd>若定时返回失败，则可能已经超时或者未设置定时器 </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>若定时返回失败，则可能已经超时或未设置定时器 </dd></dl>

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00098">98</a> 行定义.</p>

</div>
</div>
<a id="ac014a6dda1a216df1c46156da7c8f69d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac014a6dda1a216df1c46156da7c8f69d">&#9670;&nbsp;</a></span>delete_class_copy_operator() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_timer.html">CTimer</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ac014a6dda1a216df1c46156da7c8f69d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac014a6dda1a216df1c46156da7c8f69d">&#9670;&nbsp;</a></span>delete_class_copy_operator() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_timer.html">CTimer</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a23172457eece0f1cac40500075a82844"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23172457eece0f1cac40500075a82844">&#9670;&nbsp;</a></span>GetTimerBase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_timer_base.html">CTimerBase</a>&amp; CTimer::GetTimerBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00129">129</a> 行定义.</p>

</div>
</div>
<a id="a744d36ea8c827184cf2cc8634b924574"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a744d36ea8c827184cf2cc8634b924574">&#9670;&nbsp;</a></span>Reset() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool CTimer::Reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>重置定时器 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>若定时返回失败，则可能已经超时或未设置定时器 </dd></dl>

</div>
</div>
<a id="a744d36ea8c827184cf2cc8634b924574"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a744d36ea8c827184cf2cc8634b924574">&#9670;&nbsp;</a></span>Reset() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTimer::Reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>重置定时器 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>若定时返回失败，则可能已经超时或未设置定时器 </dd></dl>

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00089">89</a> 行定义.</p>

</div>
</div>
<a id="a017d22b5d1453069a8da277c69e95770"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a017d22b5d1453069a8da277c69e95770">&#9670;&nbsp;</a></span>SetTimer() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTimer::SetTimer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_handle_base.html">HandleBase</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em> = <code><a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="afadf9bf2c7fe7f1a6d7c34cbf90f979e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afadf9bf2c7fe7f1a6d7c34cbf90f979e">&#9670;&nbsp;</a></span>SetTimer() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTimer::SetTimer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00110">110</a> 行定义.</p>

</div>
</div>
<a id="a0d00239bd70be71654c2c3a7569cadbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d00239bd70be71654c2c3a7569cadbf">&#9670;&nbsp;</a></span>SetTimer() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTimer::SetTimer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00114">114</a> 行定义.</p>

</div>
</div>
<a id="ad5d4796e0e4a17289fa716210ccb97d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5d4796e0e4a17289fa716210ccb97d6">&#9670;&nbsp;</a></span>SetTimer() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CTimer::SetTimer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_c_time_base.html">CTimeBase</a> &amp;&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_sock_tools_8h.html#a65db86524d66ff5c871579e2dacf12ca">lpTimeoutCompleteFunc</a>&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em> = <code><a class="el" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置定时器 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>超时时间 </td></tr>
    <tr><td class="paramname">func</td><td>定时器超时时的回调处理函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户数据 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4963ccc407406050df39d7b7e9346625"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4963ccc407406050df39d7b7e9346625">&#9670;&nbsp;</a></span>StartTime() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_machine_time.html">CMachineTime</a>* CTimer::StartTime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_machine_time.html">CMachineTime</a> &amp;&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取定时器被设置的时间 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>传入的变量，返回开始时间节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回t的指针,失败返回NullPtr </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>t所获取的时间点并非一定为开始设置的时间，中途可能被Reset函数所修改 </dd></dl>

</div>
</div>
<a id="a4963ccc407406050df39d7b7e9346625"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4963ccc407406050df39d7b7e9346625">&#9670;&nbsp;</a></span>StartTime() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_machine_time.html">CMachineTime</a>* CTimer::StartTime </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_machine_time.html">CMachineTime</a> &amp;&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取定时器被设置的时间 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>传入的变量，返回开始时间节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回t的指针,失败返回NullPtr </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>t所获取的时间点并非一定为开始设置的时间，中途可能被Reset函数所修改 </dd></dl>

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00125">125</a> 行定义.</p>

</div>
</div>
<a id="a62a4a14066f74861211259e2700d69bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62a4a14066f74861211259e2700d69bf">&#9670;&nbsp;</a></span>TimerComplete()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> CTimer::TimerComplete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_sock_error.html">CSockError</a>&#160;</td>
          <td class="paramname"><em>ec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">友元及相关函数文档</h2>
<a id="a22a409cb83120f40cf2419f694137178"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22a409cb83120f40cf2419f694137178">&#9670;&nbsp;</a></span>CTcpClient</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_tcp_client.html">CTcpClient</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_base_8h_source.html">TimerBase.h</a> 第 <a class="el" href="_timer_base_8h_source.html#l00067">67</a> 行定义.</p>

</div>
</div>
<a id="a13347fcbf490b91017644fc3f43692f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13347fcbf490b91017644fc3f43692f0">&#9670;&nbsp;</a></span>CTcpServer</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_tcp_server.html">CTcpServer</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_base_8h_source.html">TimerBase.h</a> 第 <a class="el" href="_timer_base_8h_source.html#l00066">66</a> 行定义.</p>

</div>
</div>
<a id="a98d68824d5c09faeafd9eac9a8bc6f11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98d68824d5c09faeafd9eac9a8bc6f11">&#9670;&nbsp;</a></span>CTcpTimer</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class CTcpTimer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_base_8h_source.html">TimerBase.h</a> 第 <a class="el" href="_timer_base_8h_source.html#l00070">70</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a0131fa4a5035636cf6603900d25be408"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0131fa4a5035636cf6603900d25be408">&#9670;&nbsp;</a></span>_tcpService</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CBasicServiceBase* CTimer::_tcpService</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_base_8h_source.html">TimerBase.h</a> 第 <a class="el" href="_timer_base_8h_source.html#l00065">65</a> 行定义.</p>

</div>
</div>
<a id="ae2708cea97ddec84d6b7ede3c2e6d2d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2708cea97ddec84d6b7ede3c2e6d2d9">&#9670;&nbsp;</a></span>_timer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt;<a class="el" href="class_c_timer_base.html">CTimerBase</a>&gt; CTimer::_timer</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_8h_source.html">Timer.h</a> 第 <a class="el" href="_timer_8h_source.html#l00131">131</a> 行定义.</p>

</div>
</div>
<a id="a71520e0e68129f9759a00383b34c8983"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71520e0e68129f9759a00383b34c8983">&#9670;&nbsp;</a></span>_tinfo</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt;<a class="el" href="_timer_info_8h.html#ad138624af884b17f15fe7c857f59a5c3">TimeoutInfo</a>&gt; CTimer::_tinfo</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_timer_base_8h_source.html">TimerBase.h</a> 第 <a class="el" href="_timer_base_8h_source.html#l00064">64</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/socket/<a class="el" href="_timer_8h_source.html">Timer.h</a></li>
<li>H:/project/LibTools/src/time/<a class="el" href="_timer_base_8h_source.html">TimerBase.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
